home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
graphics
/
mfpic
/
misc
/
rotgroup.tex
< prev
Wrap
Text File
|
1992-11-25
|
958b
|
35 lines
% rotgroup.tex - version 2 for mfpic 0.2 - 06:31 GMT Thu 26 Nov 1992.
% author - Geoffrey Tobin (ecsgrt@luxor.latrobe.edu.au)
%
% rotgroup, endrotgroup
% - Rotate mfpic coordinate system about centre #1 by #2 degrees.
%
% Any Metafont pair valued expression may be substituted for #1,
% and any numeric valued expression for #2.
% A pair is a pair of numerics, e.g. (2.71, 3.141) ;
% Numerics may be integer or real, but their magnitudes must be
% strictly less than 4096.
%
% Experiment to discover the sign of the rotation.
%
% NB: Use this code inside an mfpic picture environment.
%
\def\rotgroup#1#2{%
\mfcmd
{
begingroup
save old_ztr; % in case old_ztr's already defined.
transform old_ztr;
old_ztr := ztr;
save ztr; % lose old value and type of ztr.
ztr := old_ztr rotatedabout (#1, #2);
% metafont knows LHS must be a transform, b/c RHS is one.
}%
}
\def\endrotgroup{%
\mfcmd
{
endgroup; % restore all grouped saves.
}%
}